package run.siyuan.common.constant;

import lombok.Getter;
import lombok.ToString;

/**
 * @program: education-platform
 * @description: 返回码枚举类
 * @author: SY
 * @create: 2020-12-24 10:12
 **/
@Getter
@ToString
public enum ResultCodeEnum {

    SUCCESS(true, 20000,"成功"),
    UNKNOWN_REASON(false, 20001, "未知错误"),
    NOT_DATA_FOUND(false, 20002, "未找到数据"),

    BAD_SQL_GRAMMAR(false, 21001, "sql语法错误"),
    JSON_PARSE_ERROR(false, 21002, "json解析异常"),
    PARAM_ERROR(false, 21003, "参数不正确"),

    CODE_ERROR(false, 28000, "验证码错误"),;


    private Boolean success;

    private Integer code;

    private String message;

    ResultCodeEnum(Boolean success, Integer code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }
}
